package cn.endeavour.user.mapper;

import cn.endeavour.basic.mapper.BaseMapper;
import cn.endeavour.user.domain.WxUser;
import org.springframework.stereotype.Repository;

/**
 * 微信登录mapper
 */
@Repository
public interface WxUserMapper extends BaseMapper<WxUser> {

    /**
     * 通过openid加载用户
     * @param openid
     * @return
     */
    WxUser loadByOpenId(String openid);

    /**
     * 通过openID来查询用户是否以及绑定
     * @param openid 微信用户的id
     * @return 微信用户
     */
    WxUser findByOpenid(String openid);
}
